import request from '@/utils/request'

// 查询省赛管理员列表
export function listbanner(query) {
  return request({
    url: '/officialWebsite/banna/list',
    method: 'get',
    params: query
  })
}

// 查询省赛管理员详细
export function getbanner(id) {
  return request({
    url: '/officialWebsite/banna/' + id,
    method: 'get'
  })
}

// 新增省赛管理员
export function addbanner(data) {
  return request({
    url: '/officialWebsite/banna/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改省赛管理员
export function updatebanner(data) {
  return request({
    url: '/officialWebsite/banna/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除省赛管理员
export function delbanner(Id) {
  return request({
    url: '/officialWebsite/banna/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delbanners(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/banna/delete-by-ids',
    method: 'get',
    params: data
  })
}


// app 公众号
export function listApp(query) {
  return request({
    url: '/officialWebsite/appaccount/list',
    method: 'get',
    params: query
  })
}

// 查询app 
export function getApp(id) {
  return request({
    url: '/officialWebsite/appaccount/' + id,
    method: 'get'
  })
}

// 保存app
export function addApp(data) {
  return request({
    url: '/officialWebsite/appaccount/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改app
export function updateApp(data) {
  return request({
    url: '/officialWebsite/appaccount/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除省赛管理员
export function delApp(Id) {
  return request({
    url: '/officialWebsite/appaccount/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delApps(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/appaccount/delete-by-ids',
    method: 'get',
    params: data
  })
}
// 关于我们
export function getInfo(id) {
  return request({
    url: '/officialWebsite/linkabout/' + id,
    method: 'get'
  })
}

// 保存关于我们
export function addLinkAbout(data) {
  return request({
    url: '/officialWebsite/linkabout/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改关于我们
export function updateLinkAbout(data) {
  return request({
    url: '/officialWebsite/linkabout/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 获取公司简介信息

export function getCompanyIntroduce(id) {
  return request({
    url: '/officialWebsite/companyintroduce/getCompanyIntroduce',
    method: 'get'
  })
}

// 保存公司简介
export function addCompanyIntroduce(data) {
  return request({
    url: '/officialWebsite/companyintroduce/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改公司简介
export function updateCompanyIntroduce(data) {
  return request({
    url: '/officialWebsite/companyintroduce/saveOrUpdate',
    method: 'post',
    data: data
  })
}

/** 图片列表相关 */

export function getPic(id) {
  return request({
    url: '/officialWebsite/piclist/' + id,
    method: 'get'
  })
}

export function listPic(query) {
  return request({
    url: '/officialWebsite/piclist/list',
    method: 'get',
    params: query
  })
}

// 保存关于我们
export function addPic(data) {
  return request({
    url: '/officialWebsite/piclist/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function updatePic(data) {
  return request({
    url: '/officialWebsite/piclist/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function delPic(Id) {
  return request({
    url: '/officialWebsite/piclist/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delPics(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/piclist/delete-by-ids',
    method: 'get',
    params: data
  })
}



// ------------------------------------------------------
// 活动模块

export function listActivity(query) {
  return request({
    url: '/officialWebsite/gwbrandactive/list',
    method: 'get',
    params: query
  })
}


export function getActivity(id) {
  return request({
    url: '/officialWebsite/gwbrandactive/' + id,
    method: 'get'
  })
}


export function addActivity(data) {
  return request({
    url: '/officialWebsite/gwbrandactive/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function updateActivity(data) {
  return request({
    url: '/officialWebsite/gwbrandactive/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function delActivity(Id) {
  return request({
    url: '/officialWebsite/gwbrandactive/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delActivitys(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/gwbrandactive/delete-by-ids',
    method: 'get',
    params: data
  })
}



export function listLink(query) {
  return request({
    url: '/officialWebsite/gwfriendlink/list',
    method: 'get',
    params: query
  })
}


export function getLink(id) {
  return request({
    url: '/officialWebsite/gwfriendlink/' + id,
    method: 'get'
  })
}


export function addLink(data) {
  return request({
    url: '/officialWebsite/gwfriendlink/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function updateLink(data) {
  return request({
    url: '/officialWebsite/gwfriendlink/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function delLink(Id) {
  return request({
    url: '/officialWebsite/gwfriendlink/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delLinks(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/gwfriendlink/delete-by-ids',
    method: 'get',
    params: data
  })
}


// 基地培训
export function listTrain(query) {
  return request({
    url: '/officialWebsite/gwbasetrainpic/list',
    method: 'get',
    params: query
  })
}


export function getTrain(id) {
  return request({
    url: '/officialWebsite/gwbasetrainpic/' + id,
    method: 'get'
  })
}


export function addTrain(data) {
  return request({
    url: '/officialWebsite/gwbasetrainpic/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function updateTrain(data) {
  return request({
    url: '/officialWebsite/gwbasetrainpic/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function delTrain(Id) {
  return request({
    url: '/officialWebsite/gwbasetrainpic/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delTrains(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/gwbasetrainpic/delete-by-ids',
    method: 'get',
    params: data
  })
}


// 合作伙伴
export function listPartner(query) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/list',
    method: 'get',
    params: query
  })
}


export function getPartner(id) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/' + id,
    method: 'get'
  })
}


export function addPartner(data) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/saveOrUpdate',
    method: 'post',
    data: data
  })
}

export function updatePartner(data) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function delPartner(Id) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

export function delPartners(Ids) {
  const data = {
    "ids": Ids
  }
  return request({
    url: '/officialWebsite/gwcooperativepartner/delete-by-ids',
    method: 'get',
    params: data
  })
}

// 品牌活动标题


export function listdiscription(query) {
  return request({
    url: '/officialWebsite/gwtitlediscription/list',
    method: 'get',
    params: query
  })
}


export function getdiscription(id) {
  return request({
    url: '/officialWebsite/gwtitlediscription/' + id,
    method: 'get'
  })
}



export function updatediscription(data) {
  return request({
    url: '/officialWebsite/gwtitlediscription/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function deldiscription(Id) {
  return request({
    url: '/officialWebsite/gwcooperativepartner/delete-by-id',
    method: 'get',
    params: { "id": Id }
  })
}

